{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    }
   },
   "source": [
    "2.1 数据类型\n",
    "1. 数值类型：\n",
    "整数类型\n",
    "Decimal类型\n",
    "字面值\n",
    "2. 更多类型：\n",
    "布尔类型\n",
    "字符类型\n",
    "字符串\n",
    "3. null和void\n",
    "4. 转换\n",
    "显式转型\n",
    "隐匿转型\n",
    "不转型"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    }
   },
   "source": [
    "2.1 基本数据类型\n",
    "1. 设计规范\n",
    "在使用类型使用关键字而不是BCL类型，如不用：Systen.Int32\n",
    "C++的数据类型是shortint的缩写，而C#的short是一种实际存在的类型\n",
    "2. 浮点类型\n",
    "浮点数精度可变.除非用分类表示时,分母恰好是2的整数次幂\n",
    "浮点数精度与它所代表的数字的大小成正比,由有效数位的个数决定.\n",
    "decimal可以准确表示十进字数,与浮点类型相比范围较小.浮点类型转换为decimal类型时可能发生溢出\n",
    "decimal计算速度稍慢,差别不大以至于完全可以忽略,适合大而精确的计算,尤其是金融计算."
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    }
   },
   "source": [
    "2.1.4 字面值\n",
    "英文学习:\n",
    "字面值 literal value\n",
    "硬编码 hardcoding\n",
    "\n",
    "后缀:\n",
    "double D/d\n",
    "float F/f\n",
    "decimal M/m\n",
    "无符号整形  U \n",
    "长整形 L"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "System.Console.WriteLine(42);\n",
    "System.Console.WriteLine( 1.618034);\n",
    "System.Console.WriteLine(1.61803398874989541); //字面值小数会默认为double,所以在输出时,最后一位\"1\"会丢失\n",
    "System.Console.WriteLine(1.61803398874989541222M); //加m为decimal类型,m是货币monetary首字母\n",
    "System.Console.WriteLine(9_814_072_356); //C#7.0支持用数字分隔符\n",
    "System.Console.WriteLine(6.023E23F); //指数计数,加中缀E"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    }
   },
   "source": [
    "2.4 输出\n",
    "十进制和十六进制转换不会改变数据本身,改变的只是数的表示形式\n",
    "每个十六进制数据位都用4个二进制表示,一个字节可以表示两个十六进制数位.\n",
    "十六进制前缀 0x\n",
    "\n",
    "vscode 按发布商搜索 publisher:\"Microsoft\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "System.Console.WriteLine(0x002A); //也可以用小写a\n",
    "//输出为十进制42"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    }
   },
   "source": [
    "从C#7.0开始可以数字表示成二进制值 前缀 0b 或0B"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "System.Console.WriteLine(0b101010); //二进制表示,不用格式化表示输出为十进制\n",
    "System.Console.WriteLine($\"0x{42:X}\");//十六进制格式化:42用进六进表示\n",
    "System.Console.WriteLine($\"0x{0b101010:x}\") //X的大小写决定了十六进制字母的大小写"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "const double number=1.618033988749895;\n",
    "double result;\n",
    "string text;\n",
    "text=$\"{number}\";\n",
    "result=double.Parse(text);\n",
    "System.Console.WriteLine($\"{result==number}:result==number\");\n",
    "text=string.Format(\"{0:R}\",number);\n",
    "result=double.Parse(text);\n",
    "System.Console.WriteLine($\"{result==number}:result==number\");"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    }
   },
   "source": [
    " **string的静态方法** "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "//static string string.Format\n",
    "string text,firstName=\"an\",lastName=\"shaofneg\";\n",
    "text=string.Format(\"Your full name is {0}{1}\",firstName,lastName);\n",
    "System.Console.WriteLine(text);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "//string string string.Concat 合并\n",
    "text=string.Concat(firstName,lastName);\n",
    "System.Console.WriteLine(text);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "//static int string.Compare 比较\n",
    "string option=\"/Help\";\n",
    "int result=string.Compare(option,\"/help\"); //相同为0\n",
    "System.Console.WriteLine(result);;\n",
    "System.Console.WriteLine(string.Compare(option,\"/help\",true)); //忽略大小写"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    }
   },
   "source": [
    " **string方法**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "//判断字符串以什么结束或开始\n",
    "string lastName=\"shaonfeng\";\n",
    "bool isPhd=lastName.EndsWith(\"feng\");\n",
    "bool isDr=lastName.StartsWith(\"shao\");\n",
    "System.Console.WriteLine($\"{isPhd},{isDr}\");"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "//转换为大写\n",
    "string severity=\"warning\";\n",
    "System.Console.WriteLine(severity.ToUpper());\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "//去掉字符串首尾空格\n",
    "string text=\"  an shao fneg   \";\n",
    "System.Console.WriteLine(text.Trim());"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "//替换字符串中的字符\n",
    "string fileName=\"Hello world??\";\n",
    "fileName=fileName.Replace(\"??\",\"!!!!\");\n",
    "System.Console.WriteLine(fileName);"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    }
   },
   "source": [
    "**using和static指令**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "\n",
    "    //该指令只支持静态方法和属性,不支持实例成员\n",
    "    using static System.Console;\n",
    "   \n",
    "       \n",
    "            string firstName;\n",
    "            string lastName;\n",
    "\n",
    "            WriteLine(\"Hey you!\");\n",
    "\n",
    "            Write(\"Enter your first name: \");\n",
    "            firstName = ReadLine();\n",
    "\n",
    "            Write(\"Enter your last name: \");\n",
    "            lastName = ReadLine();\n",
    "\n",
    "            WriteLine(\n",
    "              $\"Your full name is {firstName} {lastName}.\");\n",
    "       \n"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    }
   },
   "source": [
    "[组合格式字符串MSDN文档](https://learn.microsoft.com/zh-cn/dotnet/standard/base-types/composite-formatting)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    }
   },
   "source": [
    "**换行符**\n",
    "windows换行:\\r\\n\n",
    "Unix:\\n\n",
    "消除平台差异方法,不要依赖于\"\\n\",依赖于下面方法\n",
    "System.Consolw.WriteLine()自动输出空行\n",
    "System.Environment.NewLine代表换行符."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "System.Console.Write(\"an\");\n",
    "System.Console.WriteLine(\"shaonfeg\");\n",
    "System.Console.Write(\"hello,World\"+System.Environment.NewLine);\n",
    "System.Console.Write(\"最后一行\");"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "source": [
    "**C#属性**\n",
    "属性定义了称为赋值方法(setter)和取值方法,便用字段语法访问那些方法.\n",
    "编译CIL成两个方法:\n",
    "set_<PropertyName>\n",
    "get_<PropertyName>\n",
    "这两个方法为能从C#代码直接访问,只能通过C#属性构造来访问."
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    }
   },
   "source": [
    "**2.3数据类型转换**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "int n =int.MaxValue;\n",
    "System.Console.WriteLine(n);\n",
    "n = n+1; //溢出\n",
    "System.Console.WriteLine(n);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "checked //溢出检查\n",
    "{\n",
    "int n =int.MaxValue;\n",
    "System.Console.WriteLine(n);\n",
    "n = n+1; //溢出\n",
    "System.Console.WriteLine(n);\n",
    "}\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "unchecked //强制不进行溢出检查\n",
    "{\n",
    "int n =int.MaxValue;\n",
    "System.Console.WriteLine(n);\n",
    "n = n+1; //溢出\n",
    "System.Console.WriteLine(n);\n",
    "}"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    }
   },
   "source": [
    "**2.2.3不使用转型操作的类型转换**  \n",
    "每个数据类型都包含一个`Parse()`方法,允许将字符串转换成对应的数值类型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "string text=\"9.11E-31\";\n",
    "float kgElectronMass=float.Parse(text);\n",
    "System.Console.WriteLine(kgElectronMass);"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    }
   },
   "source": [
    "TryParse()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "dotnet_interactive": {
     "language": "csharp"
    },
    "polyglot_notebook": {
     "kernelName": "csharp"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [],
   "source": [
    "double number;\n",
    "string input;\n",
    "input=System.Console.ReadLine();\n",
    "if (double.TryParse(input,out number))\n",
    "{\n",
    "    \n",
    "}\n",
    "else\n",
    "{\n",
    "    System.Console.WriteLine(\"The text entered was not a  valid number.\");\n",
    "}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "dotnet_interactive": {
     "language": ".NET"
    },
    "polyglot_notebook": {
     "kernelName": ".NET"
    },
    "vscode": {
     "languageId": "polyglot-notebook"
    }
   },
   "outputs": [
    {
     "ename": "Error",
     "evalue": "Microsoft.DotNet.Interactive.NoSuitableKernelException: No kernel found for SubmitCode: input(); with target kernel '.NET'.\r\n   at Microsoft.DotNet.Interactive.Commands.KernelCommand.InvokeAsync(KernelInvocationContext context) in D:\\a\\_work\\1\\s\\src\\Microsoft.DotNet.Interactive\\Commands\\KernelCommand.cs:line 62\r\n   at Microsoft.DotNet.Interactive.Kernel.HandleAsync(KernelCommand command, KernelInvocationContext context) in D:\\a\\_work\\1\\s\\src\\Microsoft.DotNet.Interactive\\Kernel.cs:line 326\r\n   at Microsoft.DotNet.Interactive.CompositeKernel.HandleAsync(KernelCommand command, KernelInvocationContext context) in D:\\a\\_work\\1\\s\\src\\Microsoft.DotNet.Interactive\\CompositeKernel.cs:line 192\r\n   at Microsoft.DotNet.Interactive.KernelCommandPipeline.<BuildPipeline>b__6_0(KernelCommand command, KernelInvocationContext context, KernelPipelineContinuation _) in D:\\a\\_work\\1\\s\\src\\Microsoft.DotNet.Interactive\\KernelCommandPipeline.cs:line 60\r\n   at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_1.<<BuildPipeline>b__3>d.MoveNext() in D:\\a\\_work\\1\\s\\src\\Microsoft.DotNet.Interactive\\KernelCommandPipeline.cs:line 76\r\n--- End of stack trace from previous location ---\r\n   at Microsoft.DotNet.Interactive.App.KernelExtensions.<>c__DisplayClass1_0.<<UseTelemetrySender>b__0>d.MoveNext() in D:\\a\\_work\\1\\s\\src\\dotnet-interactive\\KernelExtensions.cs:line 102\r\n--- End of stack trace from previous location ---\r\n   at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_1.<<BuildPipeline>b__3>d.MoveNext() in D:\\a\\_work\\1\\s\\src\\Microsoft.DotNet.Interactive\\KernelCommandPipeline.cs:line 76\r\n--- End of stack trace from previous location ---\r\n   at Microsoft.DotNet.Interactive.App.KernelExtensionLoader.<>c__DisplayClass0_0.<<UseNuGetExtensions>b__0>d.MoveNext() in D:\\a\\_work\\1\\s\\src\\dotnet-interactive\\KernelExtensionLoader.cs:line 39\r\n--- End of stack trace from previous location ---\r\n   at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_0.<<BuildPipeline>g__Combine|2>d.MoveNext() in D:\\a\\_work\\1\\s\\src\\Microsoft.DotNet.Interactive\\KernelCommandPipeline.cs:line 77\r\n--- End of stack trace from previous location ---\r\n   at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_0.<<BuildPipeline>g__Combine|2>d.MoveNext() in D:\\a\\_work\\1\\s\\src\\Microsoft.DotNet.Interactive\\KernelCommandPipeline.cs:line 77\r\n--- End of stack trace from previous location ---\r\n   at Microsoft.DotNet.Interactive.KernelCommandPipeline.SendAsync(KernelCommand command, KernelInvocationContext context) in D:\\a\\_work\\1\\s\\src\\Microsoft.DotNet.Interactive\\KernelCommandPipeline.cs:line 51",
     "output_type": "error",
     "traceback": [
      "Microsoft.DotNet.Interactive.NoSuitableKernelException: No kernel found for SubmitCode: input(); with target kernel '.NET'.\r\n",
      "   at Microsoft.DotNet.Interactive.Commands.KernelCommand.InvokeAsync(KernelInvocationContext context) in D:\\a\\_work\\1\\s\\src\\Microsoft.DotNet.Interactive\\Commands\\KernelCommand.cs:line 62\r\n",
      "   at Microsoft.DotNet.Interactive.Kernel.HandleAsync(KernelCommand command, KernelInvocationContext context) in D:\\a\\_work\\1\\s\\src\\Microsoft.DotNet.Interactive\\Kernel.cs:line 326\r\n",
      "   at Microsoft.DotNet.Interactive.CompositeKernel.HandleAsync(KernelCommand command, KernelInvocationContext context) in D:\\a\\_work\\1\\s\\src\\Microsoft.DotNet.Interactive\\CompositeKernel.cs:line 192\r\n",
      "   at Microsoft.DotNet.Interactive.KernelCommandPipeline.<BuildPipeline>b__6_0(KernelCommand command, KernelInvocationContext context, KernelPipelineContinuation _) in D:\\a\\_work\\1\\s\\src\\Microsoft.DotNet.Interactive\\KernelCommandPipeline.cs:line 60\r\n",
      "   at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_1.<<BuildPipeline>b__3>d.MoveNext() in D:\\a\\_work\\1\\s\\src\\Microsoft.DotNet.Interactive\\KernelCommandPipeline.cs:line 76\r\n",
      "--- End of stack trace from previous location ---\r\n",
      "   at Microsoft.DotNet.Interactive.App.KernelExtensions.<>c__DisplayClass1_0.<<UseTelemetrySender>b__0>d.MoveNext() in D:\\a\\_work\\1\\s\\src\\dotnet-interactive\\KernelExtensions.cs:line 102\r\n",
      "--- End of stack trace from previous location ---\r\n",
      "   at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_1.<<BuildPipeline>b__3>d.MoveNext() in D:\\a\\_work\\1\\s\\src\\Microsoft.DotNet.Interactive\\KernelCommandPipeline.cs:line 76\r\n",
      "--- End of stack trace from previous location ---\r\n",
      "   at Microsoft.DotNet.Interactive.App.KernelExtensionLoader.<>c__DisplayClass0_0.<<UseNuGetExtensions>b__0>d.MoveNext() in D:\\a\\_work\\1\\s\\src\\dotnet-interactive\\KernelExtensionLoader.cs:line 39\r\n",
      "--- End of stack trace from previous location ---\r\n",
      "   at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_0.<<BuildPipeline>g__Combine|2>d.MoveNext() in D:\\a\\_work\\1\\s\\src\\Microsoft.DotNet.Interactive\\KernelCommandPipeline.cs:line 77\r\n",
      "--- End of stack trace from previous location ---\r\n",
      "   at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_0.<<BuildPipeline>g__Combine|2>d.MoveNext() in D:\\a\\_work\\1\\s\\src\\Microsoft.DotNet.Interactive\\KernelCommandPipeline.cs:line 77\r\n",
      "--- End of stack trace from previous location ---\r\n",
      "   at Microsoft.DotNet.Interactive.KernelCommandPipeline.SendAsync(KernelCommand command, KernelInvocationContext context) in D:\\a\\_work\\1\\s\\src\\Microsoft.DotNet.Interactive\\KernelCommandPipeline.cs:line 51"
     ]
    }
   ],
   "source": [
    "input();"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": ".NET (C#)",
   "language": "C#",
   "name": ".net-csharp"
  },
  "polyglot_notebook": {
   "kernelInfo": {
    "defaultKernelName": "csharp",
    "items": [
     {
      "aliases": [
       "c#",
       "C#"
      ],
      "languageName": "C#",
      "name": "csharp"
     },
     {
      "aliases": [
       "frontend"
      ],
      "name": "vscode"
     },
     {
      "aliases": [],
      "name": ".NET"
     },
     {
      "aliases": [
       "f#",
       "F#"
      ],
      "languageName": "F#",
      "name": "fsharp"
     },
     {
      "aliases": [],
      "languageName": "HTML",
      "name": "html"
     },
     {
      "aliases": [
       "js"
      ],
      "languageName": "JavaScript",
      "name": "javascript"
     },
     {
      "aliases": [],
      "languageName": "KQL",
      "name": "kql"
     },
     {
      "aliases": [],
      "languageName": "Mermaid",
      "name": "mermaid"
     },
     {
      "aliases": [
       "powershell"
      ],
      "languageName": "PowerShell",
      "name": "pwsh"
     },
     {
      "aliases": [],
      "languageName": "SQL",
      "name": "sql"
     },
     {
      "aliases": [],
      "name": "value"
     },
     {
      "aliases": [],
      "name": "webview"
     }
    ]
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
